package metier.entities;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;


@Entity
@DiscriminatorValue(value="client")
public class Client extends Utilisateur{
	
	
	//champs client priv�
	private String Nom;
	private String Prenom;
	
	
	@ManyToOne
	@JoinColumn(name="IdVille_usr")
	private Ville Ville_Utilisateur;
	
	//déclaration
	@OneToMany(mappedBy="Transporteur")
	private List<Declaration> listeDeclaration=new ArrayList<Declaration>();
	
	
	//clients
	@OneToMany(mappedBy="client")
	private List<Paiement> listePaiement=new ArrayList<Paiement>();
	
	private String CodePost_usr;
	private String Rue_usr;
	private String Telephone_usr;
	private String Mobile_usr;
	private Long CID;
	
	
	
	//champs pour un client proffessionnel
	
	public List<Paiement> getListePaiement() {
		return listePaiement;
	}


	public void setListePaiement(List<Paiement> listePaiement) {
		this.listePaiement = listePaiement;
	}





	private String position;
	//proffessionnelle ou priv�
	private String Type_client;
	
	//Transporteur ou expediteur
	private String TranExp;
	
	//� propos de la soci�t�
	private String Nom_Societe;
	private String Details_Societe;
	
	@ManyToOne
	@JoinColumn(name="id")
	private Langue langue;
	
	@ManyToOne
	@JoinColumn(name="idIndustrie")
	private Industrie industrie;
	
	//type de service local national international pour un transporteur
	private String ServiceType;
	
	//ville societe
	@ManyToOne
	@JoinColumn(name="IdVille_Societe")
	private  Ville ville_Societe;
	
	private String CodePost_Societe;
	private String Rue_Societe;
	
	private String Telephone_societe;
	private String Fax;
	private String Organization_Number;
	
	
	@OneToMany(mappedBy="Client",cascade=CascadeType.ALL)
	List<GLN> list_GLN=new ArrayList<GLN>();
	
	//assurance
	private String Assurance_Societe;
	private String Assurance_Adresse;
	private String Assurance_Policy_Number;
	private String Assurance_montant;
	private String Assurance_Contact_phone;
	private Date Asssurance_Expiration;
	
	//cordonn�es postal
	
	@ManyToOne
	@JoinColumn(name="idVille_Postal")
	private Ville ville_postal;
	
	private String CodePost_Postal;
	private String Rue_Postal;
	
	
	//Expediteur
	private String Web_Site;
	
	//Transporteur
	

	@ManyToMany(cascade=CascadeType.ALL)
	private  List<TransportCat> listTransportTrCat=new ArrayList<TransportCat>();
	
	
	//GLN class
	@OneToMany(mappedBy="Client",cascade=CascadeType.ALL)
	private List<GLN> list_gln=new ArrayList<GLN>();
   
	
	@OneToMany(mappedBy = "pk.client", cascade=CascadeType.ALL)
	private List<ClientAbonnement> CABs=new ArrayList<ClientAbonnement>();
	
	
	
	//liste des offres 
	@OneToMany(mappedBy="Expediteur")
	private List<Offre> listeOffre=new ArrayList<Offre>();
	
	
	
	
	public List<Declaration> getListeDeclaration() {
		return listeDeclaration;
	}


	public void setListeDeclaration(List<Declaration> listeDeclaration) {
		this.listeDeclaration = listeDeclaration;
	}


	public List<Offre> getListeOffre() {
		return listeOffre;
	}


	public void setListeOffre(List<Offre> listeOffre) {
		this.listeOffre = listeOffre;
	}


	public List<TransportCat> getListTransportTrCat() {
		return listTransportTrCat;
	}


	public void setListTransportTrCat(List<TransportCat> listTransportTrCat) {
		this.listTransportTrCat = listTransportTrCat;
	}


	public List<ClientAbonnement> getCABs() {
		
		return CABs;
	}


	public void setCABs(List<ClientAbonnement> cABs) {
		CABs = cABs;
	}


	public String getNom() {
		return Nom;
	}


	public void setNom(String nom) {
		Nom = nom;
	}


	public String getPrenom() {
		return Prenom;
	}


	public void setPrenom(String prenom) {
		Prenom = prenom;
	}


	public Ville getVille_Utilisateur() {
		return Ville_Utilisateur;
	}


	public void setVille_Utilisateur(Ville ville_Utilisateur) {
		Ville_Utilisateur = ville_Utilisateur;
	}


	public String getCodePost_usr() {
		return CodePost_usr;
	}


	public void setCodePost_usr(String codePost_usr) {
		CodePost_usr = codePost_usr;
	}


	public String getRue_usr() {
		return Rue_usr;
	}


	public void setRue_usr(String rue_usr) {
		Rue_usr = rue_usr;
	}


	public String getTelephone_usr() {
		return Telephone_usr;
	}


	public void setTelephone_usr(String telephone_usr) {
		Telephone_usr = telephone_usr;
	}


	public String getMobile_usr() {
		return Mobile_usr;
	}


	public void setMobile_usr(String mobile_usr) {
		Mobile_usr = mobile_usr;
	}


	public Long getCID() {
		return CID;
	}


	public void setCID(Long cID) {
		CID = cID;
	}


	public String getPosition() {
		return position;
	}


	public void setPosition(String position) {
		this.position = position;
	}


	public String getType_client() {
		return Type_client;
	}


	public void setType_client(String type_client) {
		Type_client = type_client;
	}


	public String getNom_Societe() {
		return Nom_Societe;
	}


	public void setNom_Societe(String nom_Societe) {
		Nom_Societe = nom_Societe;
	}


	public String getDetails_Societe() {
		return Details_Societe;
	}


	public void setDetails_Societe(String details_Societe) {
		Details_Societe = details_Societe;
	}


	public Industrie getIndustrie() {
		return industrie;
	}


	public void setIndustrie(Industrie industrie) {
		this.industrie = industrie;
	}


	public String getServiceType() {
		return ServiceType;
	}


	public void setServiceType(String serviceType) {
		ServiceType = serviceType;
	}


	public Ville getVille_Societe() {
		return ville_Societe;
	}


	public void setVille_Societe(Ville ville_Societe) {
		this.ville_Societe = ville_Societe;
	}


	public String getCodePost_Societe() {
		return CodePost_Societe;
	}


	public void setCodePost_Societe(String codePost_Societe) {
		CodePost_Societe = codePost_Societe;
	}


	public String getRue_Societe() {
		return Rue_Societe;
	}


	public void setRue_Societe(String rue_Societe) {
		Rue_Societe = rue_Societe;
	}


	public String getTelephone_societe() {
		return Telephone_societe;
	}


	public void setTelephone_societe(String telephone_societe) {
		Telephone_societe = telephone_societe;
	}


	public String getFax() {
		return Fax;
	}


	public void setFax(String fax) {
		Fax = fax;
	}


	public String getOrganization_Number() {
		return Organization_Number;
	}


	public void setOrganization_Number(String organization_Number) {
		Organization_Number = organization_Number;
	}


	public List<GLN> getList_GLN() {
		return list_GLN;
	}


	public void setList_GLN(List<GLN> list_GLN) {
		this.list_GLN = list_GLN;
	}


	public String getAssurance_Societe() {
		return Assurance_Societe;
	}


	public void setAssurance_Societe(String assurance_Societe) {
		Assurance_Societe = assurance_Societe;
	}


	public String getAssurance_Adresse() {
		return Assurance_Adresse;
	}


	public void setAssurance_Adresse(String assurance_Adresse) {
		Assurance_Adresse = assurance_Adresse;
	}


	public String getAssurance_Policy_Number() {
		return Assurance_Policy_Number;
	}


	public void setAssurance_Policy_Number(String assurance_Policy_Number) {
		Assurance_Policy_Number = assurance_Policy_Number;
	}


	public String getAssurance_montant() {
		return Assurance_montant;
	}


	public void setAssurance_montant(String assurance_montant) {
		Assurance_montant = assurance_montant;
	}


	


	public String getAssurance_Contact_phone() {
		return Assurance_Contact_phone;
	}


	public void setAssurance_Contact_phone(String assurance_Contact_phone) {
		Assurance_Contact_phone = assurance_Contact_phone;
	}


	public Date getAsssurance_Expiration() {
		return Asssurance_Expiration;
	}


	public void setAsssurance_Expiration(Date asssurance_Expiration) {
		Asssurance_Expiration = asssurance_Expiration;
	}


	public Ville getVille_postal() {
		return ville_postal;
	}


	public void setVille_postal(Ville ville_postal) {
		this.ville_postal = ville_postal;
	}


	public String getCodePost_Postal() {
		return CodePost_Postal;
	}


	public void setCodePost_Postal(String codePost_Postal) {
		CodePost_Postal = codePost_Postal;
	}


	public String getRue_Postal() {
		return Rue_Postal;
	}


	public void setRue_Postal(String rue_Postal) {
		Rue_Postal = rue_Postal;
	}


	public String getWeb_Site() {
		return Web_Site;
	}


	public void setWeb_Site(String web_Site) {
		Web_Site = web_Site;
	}


	


	public String getTranExp() {
		return TranExp;
	}


	public void setTranExp(String tranExp) {
		TranExp = tranExp;
	}


	


	public Langue getLangue() {
		return langue;
	}


	public void setLangue(Langue langue) {
		this.langue = langue;
	}


	public List<GLN> getList_gln() {
		return list_gln;
	}


	public void setList_gln(List<GLN> list_gln) {
		this.list_gln = list_gln;
	}


	public Client() {
		super();
		// TODO Auto-generated constructor stub
	}


	


	public Client(String username, String password, String email, boolean statut) {
		super(username, password, email, statut);
	}
	
	
	
	
}
